import { defineConfig } from 'umi';
import routes from './routes';
import proxy from './proxy';
import plugins from './plugins';
import chunks from './chunks';

export default defineConfig({
  nodeModulesTransform: {
    type: 'none',
  },
  define: {
    'process.env.UMI_ENV': process.env.UMI_ENV,
  },
  routes,
  proxy,
  fastRefresh: {},
  history: { type: 'hash' },
  publicPath: './',
  hash: true,
  sass: {
    prependData: `@import "@/styles/index.scss";`,
  },
  dynamicImport: {
    loading: '@/components/Loading',
  },
  ignoreMomentLocale: true,
  layout: false,
  ...chunks,
  ...plugins,
});
